// Created by Windward Studios - no copyright is claimed. This code can be used in
// any manner by anyone for any reason. There is no copyright of any kind on it. You may
// use it in commercial products. You may change it without sharing those changes.
// We ask that you keep the "created by Windward Studios" in a comment at the top.

namespace net.windward.utils.ado
{
	///<summary>
	/// A lightweight handler of functionality that the ODBC and OleDb drivers can use as well as the main implementations.
	///</summary>
	public interface IWrSyntax
	{
		/// <summary>
		/// Convert a select to normalize the "top 10" syntax
		/// </summary>
		/// <param name="select">The select with our standard usage</param>
		/// <returns>The select for this database.</returns>
		string ConvertSelect(string select);

		/// <summary>
		/// Create a safe table name. Generally needed only if the name has a space in it or is a reserved name.
		/// </summary>
		/// <param name="tableName">The true table name.</param>
		/// <returns>The table name as it should be used in a select.</returns>
		string SafeTableName(string tableName);

		/// <summary>
		/// Create a safe column name. Generally needed only if the name has a space in it or is a reserved name.
		/// </summary>
		/// <param name="columnName">The true column name.</param>
		/// <returns>The table name as it should be used in a select.</returns>
		string SafeColumnName(string columnName);

		/// <summary>
		/// Create a safe table name. Generally needed only if the name has a space in it or is a reserved name.
		/// </summary>
		/// <param name="tableName">The true table name.</param>
		/// <param name="columnName">The true column name.</param>
		/// <returns>The table name as it should be used in a select.</returns>
		string SafeTableColumnName(string tableName, string columnName);
	}
}
